package com.cscj.android.repository.db.entity

import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity("hot_search")
data class HotSearchEntity(
    @PrimaryKey val id: Int = 0, val sourceType: Int, val content: String, val order: Int, val url: String
) {

    companion object {
        const val SourceTypeBaidu = 4
        const val SourceTypeTouTiao = 5
        const val SourceTypeWeibo = 1
        const val SourceTypeZhihu = 2
        const val SourceTypeBilibili = 3
        const val SourceTypeZongYi = 10
    }

    fun getSourceContent(): String {
        return when (sourceType) {
            SourceTypeBaidu -> "百度热搜"
            SourceTypeTouTiao -> "头条热搜"
            SourceTypeWeibo -> "微博热搜"
            else -> ""
        }
    }


}
